<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../taglibs.jsp" %>
<script type="text/javascript">
	$(function() {
		$("#query").click(function() {
		
			$("form:first").submit();
		});
		
		var chart =  new FusionCharts('${path}/js/FusionCharts/Charts/FCF_Column3D.swf', "ChartId", "800", "200"); 
		var data = $("#xmlData").val();
		chart.setDataXML(data);
	    chart.render('opChart'); 
	
	    
	    $("#chartStyle").change(function(){
	    	var val = $(this).val();
	    	var url = '${path}/js/FusionCharts/Charts/'+val
	    	var chart =  new FusionCharts(url, "ChartId", "800", "200"); 
			var data = $("#xmlData").val();
			chart.setDataXML(data);
		    chart.render('opChart'); 
	    })
	});	
</script>
<div class="content-right">
	<div class="content-r-pic_w">
		<div style="margin:8px auto auto 12px;margin-top:6px">
			<span class="page_title">进货报表</span>
		</div>
	</div>
	<input type="hidden" id="xmlData" value="<s:property value="xmlStr"/>">
	<div class="content-text">
		<form action="${path }/bill_buyBill" method="post">
			<div class="square-o-top">
				<table width="100%" border="0" cellpadding="0" cellspacing="0"
					style="font-size:14px; font-weight:bold; font-family:"黑体";">
					<tr>
						<td width="70" height="30">报表类别:</td>
						
						<td width="70">订单类别:</td>
						<td width="190">
							<!-- <select>
								<option value="-1">----请-选-择----</option>
								<option value="1">未审核</option>
								<option value="0">正在派单</option>
								<option value="0">正在采购</option>
								<option value="0">正在入库</option>
							</select> -->
							<s:select cssStyle="width:150px;" list="#{'1':'采购单','2':'运输单','3':'入库单' }" name="erpQuery.orderType" headerKey="" headerValue="--请选择--"></s:select>
						</td>
						<td width="70">开始日期:</td>
						<td width="190">
							<s:textfield name="erpQuery.startTime" size="18" onfocus="c.showMoreDay=false;c.show(this);"></s:textfield>
						<td ><a id="query"> <img
								src="${path}/images/can_b_01.gif" border="0" /> </a></td>
					</tr>
					<tr>
						<td height="30">&nbsp;</td>
						
						<td>厂商名称:</td>
						<td>
							<!-- <select class="kuan">
								<option value="-1">----请-选-择----</option>
								<option value="1">七匹狼</option>
								<option value="2">康师傅</option>
							</select> -->
							<s:select cssClass="kuan" list="#suppliers" name="erpQuery.supplierId" headerKey="" headerValue="--请选择--" listKey="supplierId" listValue="name"></s:select>
						</td>
						<td>结束日期:</td>
						<td width="190">
							<s:textfield name="erpQuery.endTime" size="18" onfocus="c.showMoreDay=false;c.show(this);"></s:textfield>
						</td>
						<td>
							<select id="chartStyle">
								<option value="FCF_Line.swf">线图</option>
								<option value="FCF_Area2D.swf">区域图</option>
								<option value="FCF_Column2D.swf">2D柱状图</option>
								<option value="FCF_Bar2D.swf">横柱状图</option>
							</select>
						</td>
					</tr>
				</table>
			</div>
			<div id="opChart" style="margin-left: 20px;"> 
					
			</div>
			<!--"square-o-top"end-->
			<div class="square-order" style="height: 200px;overflow: auto;">
				<table width="100%" border="1" cellpadding="0" cellspacing="0" style="float:left; ">
					<tr align="center"
						style="background:url(images/table_bg.gif) repeat-x;">
						<td colspan="2" width="49%" height="30">商品名称</td>
						<td colspan="2" width="28%">总数量</td>
						<td width="23%">详情</td>
					</tr>
						
						<s:iterator value="#opList" var="op">
						<tr align="center" bgcolor="#FFFFFF">
							<td colspan="2" width="30%" height="30"><s:property value="#op.productName"/></td>
							<td colspan="2"><s:property value="#op.productNum"/></td>
							<td>
								<a href="javascript:void(0)" class="xiu info" value="1">
									详情
								</a>
							</td>
						</tr>
						</s:iterator>
						
				</table>
				<!-- <div style="float:right;"> 
					<a href="demo.png">
						<img id="pei" src="demo.png" width="228px" height="180px">
					</a>
				</div> -->
			</div>
		</form>
	</div>
	<div class="content-bbg"></div>
</div>
